#!/bin/bash
EXPECTED_ARGS=1
E_BADARGS=65

if [ $# -ne $EXPECTED_ARGS ]
then
  echo "Usage: `basename $0` {arg}"
  exit $E_BADARGS
fi

echo "n_run="$1;
for (( c=1; c<=$1; c++ ))
do
./motif --em-max --input=upstream.fasta --run=1 --iter=50 --mtlen=6 --seed=$c --output=upstream.fasta.model$c > log_file$c 2>&1 &
done